package hh.util.arr;

import java.util.ArrayList;
import java.util.List;

public class ArrUtil {

    public static boolean isEmpty(Object[] params) {
        return params == null || params.length == 0;
    }
    public static boolean isNotEmpty(Object[] params) {
        return !isEmpty(params);
    }

    public static <T> List<T> toList(T... args) {
        if (isEmpty(args)) {
            return new ArrayList<>(0);
        }
        List<T> list = new ArrayList<>();
        for (T arg : args) {
            list.add(arg);
        }
        return list;
    }
}
